package com.hui.java.Synchronized;

/**
 * TODO: 可重入粒度测试：调用类内另外的方法
 *
 * @author chenth
 * @create 2019-09-16 20:09
 **/
public class Synchronized可重入2 {

    public static void main(String[] args) {
        Synchronized可重入2 synchronized可重入 = new Synchronized可重入2();
        synchronized可重入.method1();
    }

    private synchronized void method1() {
        System.out.println("这是method1 ");
        method2();
    }

    private synchronized void method2() {
        System.out.println("这是method2 ");
    }
}
